<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>update_student</title>
</head>
<body>
<form action="" method="post">
    {% csrf_token %}
    <input type="text" hidden name="id" value="{{ student.id }}">
    学生姓名:<input type="text" name="name" value="{{ student.name }}">&nbsp;&nbsp;
    <br>
    学生年龄:<input type="text" name="age" value="{{ student.age }}">&nbsp;&nbsp;
    <br>
    学生电话: <input type="text" name="phone" value="{{ student.phone }}"> &nbsp;&nbsp;
    {#    学生性别:{{ student.get_gender_display }} &nbsp;&nbsp;#}
    <br>
    {% if student.gender == "1" %}
        <select name="gender" id="gender">
            <option value="0">女性</option>
            <option value="1" selected>男性</option>
        </select>
    {% else %}
        <select name="gender" id="gender">
            <option value="0" selected>女性</option>
            <option value="1">男性</option>
        </select>
    {% endif %}
    <br>
    <input type="submit" value="修改">
</form>
</body>
</html>